<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			var str=new String("This is test phrase");
			var firstIndex = str.indexOf("s");
			var lastIndex = str.lastIndexOf("s");
			var arr = str.split(" ");
			var len = str.length;
			var result="第一个‘s’的位置是："+firstIndex+"<br>"+
			"最后一个s的位置是："+lastIndex+"<br>"+
			"字符型对象的长度是："+len+"<br>"+
			"数字中的各个元素为："+arr;
			console.log((result));
		</script>
	</head>
	<body>
	</body>
</html>
